package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.entity.vo.SocialUser;
import com.atguigu.gulimall.auth.entity.vo.UserLoginVo;
import com.atguigu.gulimall.auth.entity.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description:
 * @Author 胡菜鸡
 * @Create 2022-01-14-15:26
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 注册功能
     * @author 胡菜鸡
     * @date 2022/1/14 11:25
     */
    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterVo userRegisterVo);

    /**
     * 登录功能
     * @author 胡菜鸡
     * @date 2022/1/14 16:26
     */
    @PostMapping("/member/member/login")
    public R login(@RequestBody UserLoginVo UserLoginVo);

    /**
     * 社交登录功能
     * @author 胡菜鸡
     * @date 2022/1/14 16:26
     */
    @PostMapping("/member/member/oauth2/login")
    public R oAuthLogin(@RequestBody SocialUser socialUser);
}
